<?php
if($process_to_be=='update'){
$assesment = $data->assesment;
$stat = $data->stat;
$requirements_for_admission = $data->requirements_for_admission;
$star_program = $data->star_program;
$interview = $data->interview;
$requirements_checked = $data->requirements_checked;
$requirements_checked_remarks = $data->requirements_checked_remarks;
$payment = $data->payment;
}
$statusAttrib = array('regular' => 'Regular Student', 'visiting' => 'Visiting Student', 'non-credit' => 'Non-credit' );
?>

<div class="row">
	<fieldset>
	<legend class="label">Enrollment Transaction Slip</legend>
	<?if(isset($system_message))echo $system_message;
	echo validation_errors('<div class="error">', '</div>');
	?>
		<?echo form_open('enrollment_transaction/add_enrollment_transaction/'.$enrollment_id);?>
		<?php
		if(strtolower($this->session->userdata('userType'))=='guidance'){
		?>
		<fieldset>
		<legend>Guidance</legend>
		
		<div class="input-block">
			<label class="radius secondary label">Assesment</label>
			<?php echo $assesment=='yes' ? form_radio('assesment', 'yes', 'checked'):form_radio('assesment', 'yes');?> Yes <?php echo $assesment=='no' ? form_radio('assesment', 'no', 'checked'):form_radio('assesment', 'no');?> No
		</div>
		
		<div class="input-block large-4 columns" style="padding:0px; margin:0px;">
			<label class="radius secondary label">Status</label><?='<br>'.form_error('stat');?>
			<?=form_dropdown('stat', $statusAttrib, set_value('stat',$stat));?>
		</div>
		<div class="clearfix"></div>
		
		<div class="input-block">
			<label class="radius secondary label">Requirements for Admission</label>
			<input type="text" name="requirements_for_admission" value="<?=set_value('requirements_for_admission',$requirements_for_admission);?>">
		</div>
		
		<div class="input-block">
			<label class="radius secondary label">Star Program</label>
			<?=form_radio('star_program', 'one-on-one', 'checked');?> one-on-one <?=form_radio('star_program', 'group');?> group
		</div>
		
		</fieldset>
		<?php
		}
		?>
		<?php
		if(strtolower($this->session->userdata('userType'))=='vice_principal'){
		?>
		<fieldset>
		<legend>Vice Principal</legend>
		
		<div class="input-block">
			<label class="radius secondary label">Interview</label>
			<?=form_radio('interview', 'yes', 'checked');?> Yes <?=form_radio('interview', 'no');?> No
		</div>
		
		</fieldset>
		<?php
		}
		?>
		<?php
		if(strtolower($this->session->userdata('userType'))=='registrar'){
		?>
		<fieldset>
		<legend>Registrar</legend>
		
		<div class="input-block">
			<label class="radius secondary label">Requirements</label>
			<?=form_radio('requirements_checked', 'complete', 'checked');?> Complete <?=form_radio('requirements_checked', 'incomplete');?> Incomplete
		</div>
		
		<div class="input-block">
			<label class="radius secondary label">Remarks</label>
			<input type="text" name="requirements_checked_remarks" value="<?=set_value('requirements_checked_remarks',$requirements_checked_remarks);?>">
		</div>
		
		</fieldset>
		<?php
		}
		?>
		<?php
		if(strtolower($this->session->userdata('userType'))=='cashier'||strtolower($this->session->userdata('userType'))=='finance'){
		?>
		<fieldset>
		<legend>Business Office</legend>
		
		<div class="input-block">
			<label class="radius secondary label">Payment</label>
			<?=form_radio('payment', 'yes', 'checked');?> Yes <?=form_radio('payment', 'no');?> No
		</div>
		
		</fieldset>
		<?php
		}
		?>
		<div class="row">
			<div class="small-9 columns">
			<input type="hidden" value="<?=$enrollment_id;?>" name="enrollment_id" />
			 <?php
				if($process_to_be=='add'){
				echo form_submit('add_enrollment_transaction','Submit Enrollment Transaction','class="button tiny"');
				}elseif($process_to_be=='update'){
				echo form_submit('update_enrollment_transaction','Update Enrollment Transaction','class="button tiny"');
				}
				echo form_close();
			?>
			</div>
		</div>
		</fieldset>
		
	<div>
		<?php
		if(strtolower($this->session->userdata('userType'))=='cashier'||strtolower($this->session->userdata('userType'))=='finance'){
		if($process_to_be=='update'){
		?>
		<a href="<?=site_url('pdf/enrollment_transaction/'.$enrollment_id.'/AKKLBNVdbsdBUHGfdsafdsagdasDSAd');?>" class="btn btn-mini" target="_blank">Print Enrollment Transaction Slip</a>
		<?php
		}
		}
		?>
		<a href="#" onClick="parent.history.back(); return false;" class="btn btn-success"><b>Go Back.</b></a>
	</div>
</div>
